home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 593 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.5 KB

  1. Path: sundog.tiac.net!stanr
  2. From: stanr@tiac.net (Stan Ryckman)
  3. Newsgroups: gnu.misc.discuss,comp.std.c
  4. Subject: Re: Coding Standards are ignorant
  5. Date: 18 Mar 1996 20:29:44 GMT
  6. Organization: Amber & Sneakers Fan Club
  7. Message-ID: <4ikh3o$2kv@sundog.tiac.net>
  8. References: <4gum82$14v4@info4.rus.uni-stuttgart.de> <MIB.96Mar16174948@gnu.ai.mit.edu> <4ifq40$i87@sundog.tiac.net> <MIB.96Mar18105957@gnu.ai.mit.edu>
  9. NNTP-Posting-Host: sunspot.tiac.net
  10.  
  11. In article <MIB.96Mar18105957@gnu.ai.mit.edu>,
  12. Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu> wrote:
  13. >In article <4ifq40$i87@sundog.tiac.net> stanr@tiac.net (Stan Ryckman) writes:
  14. [snip]
  15. >   [re Posix.2]
  16. [snip]
  17. >   Can't you safely do this with casting to the (possibly unsigned) long
  18. >   type?  e.g.,
  19. >       pid_t whatever;
  20. >       ...
  21. >       printf( "%lu\n", (unsigned long) whatever);
  22. >   A pain, but hardly a "can't".
  23. >
  24. >You are not guaranteed that long is the widest integral type.  
  25.  
  26. At the risk of re-starting the ages-old "long long" debate, I
  27. can't find anything in the ANSI standard that permits this.
  28. I don't have a Posix standard.
  29.  
  30. (All that's needed for printing whatever_t types would be confirmation
  31. that they are no larger than unsigned long.  I think that allowing
  32. them to be larger would break ANSI even if "long long" were an
  33. allowed extension.)
  34.  
  35. <now running to edge of ring and tagging experts to jump in>
  36.  
  37. Cheers,
  38. Stan.
  39. --
  40. Stan Ryckman  (stanr@tiac.net)
  41.   (Apologies for non-responses or late responses to some posts;
  42.   .newsrc was trashed and I'm trying to get it back to where it was.)
  43.